home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / lib / memory / memcpy.a < prev    next >
Text File  |  1994-02-01  |  660b  |  39 lines

  1.  
  2.             ;    MEMCPY.A
  3.             ;
  4.             ;    (c)Copyright 1990, Matthew Dillon, All Rights Reserved
  5.             ;
  6.             ;    memcpy(d, s, bytes) -> movmem(s, d, bytes)
  7.             ;          A0  A1  D0          A1 A0  D0
  8.             ;
  9.  
  10.             xdef    _hyper_memcpy
  11.             xdef    _memcpy
  12.             xdef    @memcpy
  13.  
  14.             xdef    _memmove
  15.             xdef    _hyper_memmove
  16.             xdef    @memmove
  17.  
  18.             xref    _movmem
  19.             xref    @movmem
  20.  
  21.             section text,code
  22.  
  23. @memcpy
  24. @memmove        exg     A0,A1
  25.             jmp     @movmem(pc)
  26.  
  27. _hyper_memcpy:
  28. _hyper_memmove:
  29. _memcpy:
  30. _memmove:
  31.             lea     4(sp),A0
  32.             movem.l (A0),D0/D1
  33.             exg     D0,D1
  34.             movem.l D0/D1,(A0)
  35.             jmp     _movmem(pc)
  36.  
  37.             END
  38.  
  39.